/*
 * 
 * LegendShop 多用户商城系统
 * 
 *  版权所有,并保留所有权利。
 * 
 */
package com.legendshop.oa.service.impl;

import java.util.List;

import com.legendshop.oa.dao.CustomerFollowDao;
import com.legendshop.oa.model.CustomerFollow;
import com.legendshop.oa.service.CustomerFollowService;
import com.legendshop.util.AppUtils;

/**
 * The Class CustomerFollowServiceImpl.
 *  服务实现类
 */
public class CustomerFollowServiceImpl  implements CustomerFollowService{
   
   /**
     *
     * 引用的Dao接口
     */
    private CustomerFollowDao customerFollowDao;

    public void setCustomerFollowDao(CustomerFollowDao customerFollowDao) {
        this.customerFollowDao = customerFollowDao;
    }

	/**
	 *  根据商城获取列表
	 */
    public List<CustomerFollow> getCustomerFollow(String userName) {
        return customerFollowDao.getCustomerFollow(userName);
    }

   	/**
	 *  根据Id获取
	 */
    public CustomerFollow getCustomerFollow(Long id) {
        return customerFollowDao.getCustomerFollow(id);
    }

   /**
	 *  删除
	 */ 
    public void deleteCustomerFollow(CustomerFollow customerFollow) {
        customerFollowDao.deleteCustomerFollow(customerFollow);
    }

   /**
	 *  保存
	 */	    
    public Long saveCustomerFollow(CustomerFollow customerFollow) {
        if (!AppUtils.isBlank(customerFollow.getId())) {
            updateCustomerFollow(customerFollow);
            return customerFollow.getId();
        }
        return customerFollowDao.saveCustomerFollow(customerFollow);
    }

   /**
	 *  更新
	 */	
    public void updateCustomerFollow(CustomerFollow customerFollow) {
        customerFollowDao.updateCustomerFollow(customerFollow);
    }

}
